//
//  XMTabPubViewController.m
//  XMJJ_zml
//
//  Created by 丁浩 on 2025/7/3.
//

#import "XMTabPubViewController.h"
#import "XMPublishViewController.h"

@interface XMTabPubViewController ()

@property (nonatomic, strong) XMPublishViewController *publishVC;

@end

@implementation XMTabPubViewController

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
//    [self creatUI];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    [self creatUI];
}

- (void)creatUI {
    XMPublishViewController *publishVC = [[XMPublishViewController alloc] init];
    [self.navigationController pushViewController:publishVC animated:YES];
}

- (XMPublishViewController *)publishVC {
    if (!_publishVC) {
        _publishVC = [[XMPublishViewController alloc] init];
        XMWeakSelf;
        _publishVC.saveSuccessBlock = ^{
            weakSelf.saveSuccessBlock ? weakSelf.saveSuccessBlock() : nil;
        };
    }
    return _publishVC;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
